Image processing method, image processing apparatus and program

ABSTRACT

The conventional correction method had a problem that when the color correction or color matching was made between two images, it was difficult to match the color of two images. An image processing method of the present invention comprises a detection step of detecting a correspondence between one color of a first plurality of colors in a first image and one color of a second plurality of colors in a second image, and a correction step of correcting the first plurality of colors or the second plurality of colors in accordance with the correspondence.

TECHNICAL FIELD

The present invention relates to an image processing method, an imageprocessing apparatus using the method, and an image processing programfor causing a computer to perform the method.

BACKGROUND ART

Conventionally, in photographing the same subject under differentconditions, an image of different color tone may be produced from dataof the photographed result depending on the condition, whereby thetechnical operator performs an image processing for matching the subjectcolor of plural images by operating the image processing software.

One of such conventional techniques involves picking up the image of thesame subject employing the apparatuses that are different in thephotographing environments and photographing characteristics, forexample, a scanner and a digital camera, and making the correction tomatch the color of both images which may be different due to differencesin the photographing environments and characteristics. JP7-121681Adisclosed the technique relating to the correction, and JP9-147098Adisclosed the technique relating to the correction of tint for oneimage.

Also, the conventional image processing apparatus as described inJP9-298657A performs an image processing method of correcting pluralimages for color tone, based on the parameters for changing the colortone which are manually inputted by the operator, to match the colortone for plural images having different color tone.

However, with the correction techniques as described in JP7-121681A andJP9-147098A, though the color correction or color matching is madebetween two images, it was difficult to match the color of two images.

Also, in the image processing apparatus as described in JP9-298657A,there was a problem that the general user having no specializedexperience or technique for the operation was not easy to match thecolor tone, since the operator must have some skills to correctobjectively or match the color tone by operating the parameters.

DISCLOSURE OF THE INVENTION

(Form 1) In order to solve the above-mentioned problems, an imageprocessing method of form 1 comprises a detection step of detecting acorrespondence between one color of a first plurality of colors in afirst image and one color of a second plurality of colors in a secondimage, and a correction step of correcting the first plurality of colorsor the second plurality of colors in accordance with the correspondence.

Since the image processing method of form 1 comprises the detection stepof detecting a correspondence between the former one color and thelatter one color, and the correction step of correcting one of the firstplurality of colors and the second plurality of colors in accordancewith the correspondence, it is possible to easily match the plurality ofcolors on one side with the plurality of colors on the other side.

(Form 2) Further, the image processing method of form 2 is the imageprocessing method according to form 1, wherein the detection stepcomprises detecting a plurality of correspondences between a firstplurality of feature colors and a second plurality of feature colors byextracting the first plurality of feature colors featuring the firstimage from the first image and extracting the second plurality offeature colors featuring the second image from the second image.

With the image processing method of form 1 or 2, when the color of thefirst image and the color of the second image are not slid evenly on thecolor space, for example, it is possible to correct the color of imageby specifying plural sets of correspondent color in view of a slide inthe color between both images.

(Form 3) Further, the image processing method of form 3 is the imageprocessing method according to form 2, wherein the detection stepcomprises making a first decision of deciding the first plurality offeature colors in accordance with the extent of appearance of the firstplurality of colors, and making a second decision of deciding the secondplurality of feature colors in accordance with the extent of appearanceof the second plurality of colors.

(Form 4) Further, the image processing method of form 4 is the imageprocessing method according to form 3, wherein the detection stepcomprises making the first decision in accordance with the extent ofappearance of a third plurality of colors over a predetermined extent ofappearance among the first plurality of colors, and making the seconddecision in accordance with the extent of appearance of a fourthplurality of colors over a predetermined extent of appearance among thesecond plurality of colors.

Since the image processing method of form 3 or 4 handles the colorsalone having the appearance frequency greater than a certain threshold,it is possible to simplify the processing.

(Form 5) Further, the image processing method of form 5 is the imageprocessing method according to form 3, wherein the detection stepcomprises detecting the plurality of correspondences so that a sum ofcolor differences between the feature colors corresponding to each othermay be minimized for possible combinations of the first plurality offeature colors and the second plurality of feature colors.

With the image processing method of form 5, it is possible toautomatically associate the feature colors based on a sum of colordifferences between feature colors.

(Form 6) Further, the image processing method of form 6 is the imageprocessing method according to form 5, wherein the detection stepcomprises weighting the color differences and the extents of appearance,and calculating a weighted sum of color differences and a weighted sumof extents of appearance.

With the image processing method of form 6, it is possible to improvethe precision of correspondence by adjusting the weights of colordifference and appearance frequency.

(Form 7) Further, the image processing method of form 7 is the imageprocessing method according to form 2, wherein the detection stepcomprises detecting the plurality of correspondences by pattern matchingof the color histogram.

With the image processing method of form 7, it is possible to reduce theerror of correspondence, because the optimal correspondence is made overthe histogram.

(Form 8) Further, the image processing method of form 8 is the imageprocessing method according to form 1, wherein the correction stepcomprises correcting the other colors with reference to one of the firstplurality of colors and the second plurality of colors.

(Form 9) Further, the image processing method of form 9 is the imageprocessing method according to form 1, wherein the correction stepcomprises correcting at least one of hue, saturation and lightness basedon a color specification system of hue, saturation and lightness.

With the image processing method of form 8 or 9, when an image of theclothes is picked up by the digital camera, for example, it is possibleto perform the correction processing in an appropriate colorspecification system depending on the processing object, withoutcorrecting the lightness strongly related with the shading, and bycorrecting only the hue and saturation strongly related with the tint,because the shading of clothes in the image is important as theinformation indicating solidness.

(Form 10) Further, the image processing method of form 10 is the imageprocessing method according to form 2, wherein the correction stepcomprises extracting the feature colors based on a predetermined domain,or a domain specified by the user.

With the image processing method of form 10, since the correctionprocessing is made for the specified domain, it is possible to eliminatethe influence of the image domain such as the background irrelevant withthe subject on the image domain of the subject by specifying the imagedomain of the subject to be corrected, and optimally correct the imagedomain of the subject to be corrected.

(Form 11) In order to solve the above-mentioned problems, an imageprocessing apparatus of form 11 comprises a detection part of detectinga correspondence between one color of a first plurality of colors in afirst image and one color of a second plurality of colors in a secondimage, and a correction part of correcting the first plurality of colorsor the second plurality of colors in accordance with the correspondence.

(Form 12) Further, the image processing apparatus of form 12 is theimage processing apparatus according to form 11, further comprising afirst input part for inputting the first image, and a second input partfor inputting the second image.

(Form 13) Further, the image processing apparatus of form 13 is theimage processing apparatus according to form 12, wherein the first inputpart is one of a scanner and a digital camera, and the second input partis the other of the scanner and the digital camera.

(Form 14) Further, the image processing apparatus of form 14 is theimage processing apparatus according to form 11, wherein the correctionpart corrects the other colors with reference to one of the firstplurality of colors and the second plurality of colors.

(Form 15) The image processing apparatus of form 15 is the imageprocessing apparatus according to form 11, wherein the correction partcorrects at least one of hue, saturation and lightness based on a colorspecification system of the hue, the saturation and the lightness.

(Form 16) The image processing apparatus of form 16 is the imageprocessing apparatus according to form 11, wherein the detection partextracts the feature colors based on a predetermined range or a rangespecified by the user.

(Form 17) The image processing apparatus of form 17 is the imageprocessing apparatus according to form 11, wherein the detection partdetects a plurality of correspondences between a first plurality offeature colors and a second plurality of feature colors by extractingthe first plurality of feature colors featuring the first image from thefirst image and extracting the second plurality of feature colorsfeaturing the second image from the second image.

(Form 18) The image processing apparatus of form 18 is the imageprocessing method according to form 17, wherein the detection part makesa first decision of deciding the first plurality of feature colors inaccordance with the extent of appearance of the first plurality ofcolors, and makes a second decision of deciding the second plurality offeature colors in accordance with the extent of appearance of the secondplurality of colors.

(Form 19) The image processing apparatus of form 19 is the imageprocessing apparatus according to form 18, wherein the detection partmakes the first decision in accordance with the extent of appearance ofa third plurality of colors over a predetermined extent of appearanceamong the first plurality of colors, and makes the second decision inaccordance with the extent of appearance of a fourth plurality of colorsover a predetermined extent of appearance among the second plurality ofcolors.

(Form 20) The image processing apparatus of form 20 is the imageprocessing apparatus according to form 18, wherein the detection partdetects the plurality of correspondences so that a sum of colordifferences between the feature colors corresponding to each other maybe minimized for possible combinations of the first plurality of featurecolors and the second plurality of feature colors.

(Form 21) The image processing apparatus of form 21 is the imageprocessing apparatus according to form 20, wherein the detection partweights the color differences and the extents of appearance, andcalculates a weighted sum of color differences and a weighted sum ofextents of appearance.

(Form 22) The image processing apparatus of form 22 is the imageprocessing apparatus according to form 17, wherein the detection partdetects the plurality of correspondences by pattern matching of thecolor histogram.

(Form 23) In order to solve the above-mentioned problems, an imageprocessing program of form 23 is the image processing program forenabling a computer to perform an image processing, the computer havinga detection part and a correction part which cooperate to perform theimage processing, wherein the program comprises a detection step ofcausing the detection part to detect a correspondence between one colorof a first plurality of colors in a first image and one color of asecond plurality of colors in a second image, and a correction step ofcausing the correction part to correct the first plurality of colors orthe second plurality of colors in accordance with the correspondence.

(Form 24) Further, the image processing program of form 24 is the imageprocessing program according to form 23, wherein the detection stepcomprises detecting a plurality of correspondences between a firstplurality of feature colors and a second plurality of feature colors byextracting the first plurality of feature colors featuring the firstimage from the first image and extracting the second plurality offeature colors featuring the second image from the second image.

(Form 25) Further, the image processing program of form 25 is the imageprocessing program according to form 24, wherein the detection stepcomprises making a first decision of deciding the first plurality offeature colors in accordance with the extent of appearance of the firstplurality of colors, and making a second decision of deciding the secondplurality of feature colors in accordance with the extent of appearanceof the second plurality of colors.

(Form 26) Further, the image processing program of form 26 is the imageprocessing program according to form 25, wherein the detection stepcomprises making the first decision in accordance with the extent ofappearance of a third plurality of colors over a predetermined extent ofappearance among the first plurality of colors, and making the seconddecision in accordance with the extent of appearance of a fourthplurality of colors over a predetermined extent of appearance among thesecond plurality of colors.

(Form 27) Further, the image processing program of form 27 is the imageprocessing program according to form 25, wherein the detection stepcomprises detecting the plurality of correspondences so that a sum ofcolor differences between the feature colors corresponding to each othermay be minimized for possible combinations of the first plurality offeature colors and the second plurality of feature colors.

(Form 28) Further, the image processing program of form 28 is the imageprocessing program according to form 27, wherein the detection stepcomprises weighting the color differences and the extents of appearance,and calculating a weighted sum of color differences and a weighted sumof extents of appearance.

(Form 29) Further, the image processing program of form 29 is the imageprocessing program according to form 24, wherein the detection stepcomprises detecting the plurality of correspondences by pattern matchingof the color histogram.

(Form 30) Further, the image processing program of form 30 is the imageprocessing program according to form 23, wherein the correction stepcomprises correcting the other colors with reference to one of the firstplurality of colors and the second plurality of colors.

(Form 31) Further, the image processing program of form 31 is the imageprocessing program according to form 23, wherein the correction stepcomprises correcting at least one of hue, saturation and lightness basedon a color specification system of hue, saturation and lightness.

(Form 32) Further, the image processing program of form 32 is the imageprocessing program according to form 24, wherein the detection stepcomprises extracting the feature colors based on a predetermined domain,or a domain specified by the user.

(Form 33) In order to solve the above-mentioned problems, a computerreadable storage medium of form 33 storing an image processing programis the computer readable storage medium storing the image processingprogram according to any one of forms 23 to 32.

Thereby, the same action and effect are attained as the image processingprogram according to any one of forms 23 to 32, and the image processingprogram is easily delivered or received via a recording medium such asCD-ROM or DVD-ROM MO.

(Form 34) Also, in order to solve the above-mentioned problems, an imageprocessing method of form 34 comprises a specification step ofspecifying the color in each of two images, and a correction step ofcorrecting the other color in one image in accordance with therelationship between both the colors.

With the image processing method of form 34, since the correction stepcomprises correcting the other color in accordance with the relationshipbetween both the colors specified at the specification step, it ispossible to correct the one image without requiring the technical inputoperation of parameters, unlike the conventional image processingmethod.

(Form 35) Also, in order to solve the above-mentioned problems, an imageprocessing method of form 35 comprises a first specification step ofspecifying one first domain in a first image capable of specifying aplurality of first domains each having the domain representative colorinformation indicating the representative color of domain, a secondspecification step of specifying one second domain in a second imagecapable of specifying a plurality of second domains each having thedomain representative color information, the second image correspondingto the first image, a correspondence step of associating the specifiedone first domain and the specified one second domain, and a correctionstep of correcting the image color information indicating the color ofthe second image in accordance with the relationship between the domainrepresentative color information of the one first domain and the domainrepresentative color information of the one second domain which areassociated.

With the image processing method of form 35, at the correction step, thesecond image is corrected in accordance with the relationship betweenthe domain representative color information of the one second domain andthe domain representative color information of the one first domain thatare specified at the first and second specification steps, it ispossible to correct the second image without requiring the technicalinput operation of parameters, unlike the conventional image processingmethod.

(Form 36) Further, the image processing method of form 36 is the imageprocessing method according to form 35, wherein the second specificationstep comprises specifying two or more second domains, and the correctionstep comprises correcting the image color information in accordance withthe relationship between the position of each of the second plurality ofdomains and the position of each of the two or more second domains.

With the image processing method according to any one of forms 34 to 36,since one correspondent color is specified by a plurality of domains,the information quantity for reference is increased, whereby thecorrespondent color with high precision can be obtained.

(Form 37) Further, the image processing method of form 37 is the imageprocessing method according to form 35, wherein the first specificationstep comprises specifying two or more first domains, the secondspecification step comprises specifying two or more second domains, andthe correction step comprises correcting the image color information bydifferent correction methods each depending on the number ofcorrespondences between the two or more first domains and the two ormore second domains.

With the image processing method of form 37, when the color of the firstimage and the color of the second image are not slid evenly on the colorspace, for example, it is possible to correct the color of image byspecifying plural sets of correspondent color in view of a slide in thecolor between both images.

(Form 38) Further, the image processing method of form 38 is the imageprocessing method according to form 35, further comprising a definitionstep of defining the domain representative color information of thedomain in terms of the small domain representative color informationindicating the representative colors of small domains contained in thedomain.

(Form 39) Further, the image processing method of form 39 is the imageprocessing method according to form 38, wherein the definition stepcomprises defining the domain representative color information of thedomain in terms of a plurality of small domain representative colorinformation indicating the representative colors of a plurality of smalldomains contained in the domain.

With the image processing method of form 38 or 39, since the domainrepresentative color information is defined by the small domainrepresentative color information indicating the representative color ofsmall domain, it is possible to define the domain representative colorinformation more properly.

(Form 40) Further, the image processing method of form 40 is the imageprocessing method according to form 38, wherein the definition stepcomprises defining the domain representative color information of thedomain in terms of the small domain representative color informationindicating the color having the highest percentage of area occupied inthe domain among the plurality of small domain representative colorinformation.

With the image processing method of form 40, since the correspondentcolor is the color having the greatest appearance frequency (area)within the specified domain, it is possible to avoid that thecorrespondent color becomes the color regarded as noise.

(Form 41) Further, the image processing method of form 41 is the imageprocessing method according to form 38, wherein the definition stepcomprises defining the domain representative color information of thedomain in terms of the small domain representative color informationindicating the color in which the percentage of area occupied in thedomain is greater than or equal to a predetermined rate among the pluralpieces of small domain representative color information.

With the image processing method of form 41, when a photographed imageof the cloth or clothes is processed, with a fine design in the domainof correspondent color, and there are a plurality of colors of which theappearance frequency (area) is over a predetermined rate and the colordifference is over a predetermined rate, the representative value ofeach color is the correspondent color, and the correspondent color ofeach color making up the design is processed, whereby it is possible tocorrect the image at higher precision.

(Form 42) Further, the image processing method of form 42 is the imageprocessing method according to form 35, wherein at least one of thefirst specification step and the second specification step comprisesspecifying a neighboring domain near the one domain specified by the onespecification step, and the definition step comprises defining thedomain representative color information of the one domain in terms ofthe neighboring domain representative color information indicating therepresentative color of both the one domain and the neighboring domain.

With the image processing method of form 42, when the correspondentcolor is specified by one point on the image, for example, in someinstances the point may not have the intended color due to mingled noiseor dust in inputting the image, whereby the correspondent color is madethe representative color of the domain by specifying the domain, makingit possible to reduce the influence of the noise.

(Form 43) Further, the image processing method of form 43 is the imageprocessing method according to form 35, wherein at least one of thefirst specification step and the second specification step comprisesspecifying an equivalent domain represented by the color substantiallyequivalent to the representative color of the one domain specified bythe one specification step, and the definition step comprises definingthe domain representative color information of the one domain in termsof the equivalent domain representative color information indicating therepresentative color of both the one domain and the equivalent domain.

With the image processing method of form 43, when a specific point isdesignated, the correspondent color is made the color of the domainbased on a predetermined range of color difference consecutive from thedesignated point, whereby it is possible to automatically select theappropriate range and reduce the influence of noise.

(Form 44) Further, the image processing method of form 44 is the imageprocessing method according to form 35, wherein at least one of thefirst specification step and the second specification step comprisesspecifying the one domain by any drawing.

(Form 45) In order to solve the above-mentioned problems, an imageprocessing apparatus of form 45 is the image processing apparatus forperforming an image processing for a first image capable of specifying aplurality of first domains each having the domain representative colorinformation indicating the representative color of the domain and asecond image capable of specifying a plurality of second domains eachhaving the domain representative color information, comprising a firstspecification part for specifying one first domain, a secondspecification part for specifying one second domain, and a correctionpart for correcting the image color information indicating the color ofeach of the plurality of second images in accordance with therelationship between the domain representative color information of theone first domain and the domain representative color information of theone second domain.

(Form 46) Further, the image processing apparatus of form 46 is theimage processing apparatus according to form 45, wherein the secondspecification part specifies two or more second domains, and thecorrection part corrects the image color information in accordance withthe relationship between the position of each of the second plurality ofdomains and the position of each of the two or more second domains.

(Form 47) Further, the image processing apparatus of form 47 is theimage processing apparatus according to form 45, wherein the firstspecification part specifies two or more first domains, the secondspecification part specifies two or more second domains, and thecorrection part corrects the image color information by differentcorrection methods each depending on the number of correspondencesbetween the two or more first domains and the two or more seconddomains.

(Form 48) Further, the image processing apparatus of form 48 is theimage processing apparatus according to form 45, further comprising adefinition part for defining the domain representative color informationof the domain in terms of the small domain representative colorinformation indicating the representative colors of small domainscontained in the domain.

(Form 49) Further, the image processing apparatus of form 49 is theimage processing apparatus according to form 48, wherein the definitionpart defines the domain representative color information of the domainin terms of a plurality of small domain representative color informationindicating the representative colors of a plurality of small domainscontained in the domain.

(Form 50) Further, the image processing apparatus of form 50 is theimage processing apparatus according to form 48, wherein the definitionpart defines the domain representative color information of the domainin terms of the small domain representative color information indicatingthe color having the highest percentage of area occupied in the domainamong the plurality of small domain representative color information.

(Form 51) Further, the image processing apparatus of form 51 is theimage processing apparatus according to form 48, wherein the definitionpart defines the domain representative color information of the domainin terms of the small domain representative color information indicatingthe color in which the percentage of area occupied in the domain isgreater than or equal to a predetermined rate among the plural pieces ofsmall domain representative color information.

(Form 52) Further, the image processing apparatus of form 52 is theimage processing apparatus according to form 45, wherein at least one ofthe first specification part and the second specification part specifiesa neighboring domain near the one domain specified by the onespecification part, and the definition part defines the domainrepresentative color information of the one domain in terms of theneighboring domain representative color information indicating therepresentative color of both the one domain and the neighboring domain.

(Form 53) Further, the image processing apparatus of form 53 is theimage processing apparatus according to form 45, wherein at least one ofthe first specification part and the second specification part specifiesan equivalent domain represented by the color substantially equivalentto the representative color of the one domain specified by the onespecification part, and the definition part defines the domainrepresentative color information of the one domain in terms of theequivalent domain representative color information indicating therepresentative color of both the one domain and the equivalent domain.

(Form 54) Further, the image processing apparatus of form 54 is theimage processing apparatus according to form 45, wherein at least one ofthe first specification part and the second specification part specifiesthe one domain by any drawing.

(Form 55) In order to solve the above-mentioned problems, an imageprocessing program of form 55 comprises, in a second image correspondingto a first image capable of specifying a plurality of first domains eachhaving the domain representative color information indicating therepresentative color of the domain, the second image capable ofspecifying a plurality of second domains each having the domainrepresentative color information, a specification step of specifying onesecond domain, and a correction step of correcting the image colorinformation indicating the color of the second image in accordance withthe relationship between the domain representative color information ofthe one second domain and the domain representative color information ofone first domain corresponding to the one second domain.

(Form 56) Also, in order to solve the above-mentioned problems, an imageprocessing program of form 56 is the image processing program forenabling a computer to perform an image processing, the computer havinga first input part, a second input part of which the colorcharacteristic is different from that of the first input part, adecision part, a first specification part, a second specification partand a correction part which cooperate to perform the image processingbetween a first image capable of specifying a plurality of first domainseach having the domain representative color information indicating therepresentative color of the domain and a second image capable ofspecifying a plurality of second domains each having the domainrepresentative color information, the program comprising a firstspecification step of causing the first specification part to specifyone first domain, a second specification step of causing the secondspecification part to specify one second domain, and a correction stepof causing the correction part to correct the image color informationindicating the color of the second image in accordance with therelationship between the domain representative color information of theone first domain and the domain

(Form 57) Further, the image processing program of form 57 is the imageprocessing program according to form 56, wherein the secondspecification step comprises specifying two or more second domains, andthe correction step comprises correcting the image color information inaccordance with the relationship between the position of each of theplurality of second domains and the position of each of the two or moresecond domains.

(Form 58) Further, the image processing program of form 58 is the imageprocessing program according to form 56, wherein the first specificationstep comprises specifying two or more first domains, the secondspecification step comprises specifying two or more second domains, andthe correction step comprises correcting the image color information bydifferent correction methods each depending on the number ofcorrespondences between the two or more first domains and the two ormore second domains.

(Form 59) Further, the image processing program of form 59 is the imageprocessing program according to form 56, further comprising a definitionstep of defining the domain representative color information of thedomain in terms of the small domain representative color informationindicating the representative colors of small domains contained in thedomain.

(Form 60) Further, the image processing program of form 60 is the imageprocessing program according to form 59, wherein the definition stepcomprises defining the domain representative color information of thedomain in terms of a plurality of small domain representative colorinformation indicating the representative colors of a plurality of smalldomains contained in the domain.

(Form 61) Further, the image processing program of form 61 is the imageprocessing program according to form 59, wherein the definition stepcomprises defining the domain representative color information of thedomain in terms of the small domain representative color informationindicating the color having the highest percentage of area occupied inthe domain among the plurality of small domain representative colorinformation.

(Form 62) Further, the image processing program of form 62 is the imageprocessing program according to form 59, wherein the definition stepcomprises defining the domain representative color information of thedomain in terms of the small domain representative color informationindicating the color in which the percentage of area occupied in thedomain is greater than or equal to a predetermined rate among the pluralpieces of small domain representative color information.

(Form 63) Further, the image processing program of form 63 is the imageprocessing program according to form 56, wherein at least one of thefirst specification step and the second specification step comprisesspecifying a neighboring domain near the one domain specified by the onespecification step, and the definition step comprises defining thedomain representative color information of the one domain in terms ofthe neighboring domain representative color information indicating therepresentative color of both the one domain and the neighboring domain.

(Form 64) Further, the image processing program of form 64 is the imageprocessing program according to form 56, wherein at least one of thefirst specification step and the second specification step comprisesspecifying an equivalent domain represented by the color substantiallyequivalent to the representative color of the one domain specified bythe one specification step, and the definition step comprises definingthe domain representative color information of the one domain in termsof the equivalent domain representative color information indicating therepresentative color of both the one domain and the equivalent domain.

(Form 65) Further, the image processing program of form 65 is the imageprocessing program according to form 56, wherein at least one of thefirst specification step and the second specification step comprisesspecifying the one domain by any drawing.

(Form 66) In order to solve the above-mentioned problems, a computerreadable storage medium of form 66 storing an image processing programis the computer readable storage medium storing the image processingprogram for enabling a computer to perform an image processing, thecomputer having a first input part, a second input part of which thecolor characteristic is different from that of the first input part, adecision part, a first specification part, a second specification partand a correction part which cooperate to perform the image processingbetween a first image capable of specifying a plurality of first domainseach having the domain representative color information indicating therepresentative color of the domain and a second image capable ofspecifying a plurality of second domains each having the domainrepresentative color information, the program comprising a firstspecification step of causing the first specification part to specifyone first domain, a second specification step of causing the secondspecification part to specify one second domain, and a correction stepof causing the correction part to correct the image color informationindicating the color of the second image in accordance with therelationship between the domain representative color information of theone first domain and the domain representative color information of theone second domain.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram showing the configuration of an image processingapparatus according to the embodiments 1 to 3 of the present invention;

FIGS. 2A and 2B are views showing two images before processing by theimage processing apparatus of an embodiment 1;

FIGS. 3B1, 3B2 and 3B3 are views showing two images after processing bythe image processing apparatus of the embodiment 1;

FIG. 4 is a flowchart showing the operation of the image processingapparatus of the embodiment 1;

FIGS. 5A and 5B are graphs for explaining the extraction of featurecolor in the embodiment 1;

FIG. 6 is a diagram showing the correction by a correction part in theembodiment 1;

FIG. 7 is a diagram showing another correction by the correction part ina modification of the embodiment 1;

FIG. 8 is a diagram showing another correction by the correction part inanother modification of the embodiment 1;

FIGS. 9A and 9B are views showing two images before processing by animage processing apparatus of an embodiment 2;

FIGS. 10A and 10B are views showing two images after processing by theimage processing apparatus of the embodiment 2;

FIG. 11 is a flowchart showing the operation of the image processingapparatus of the embodiment 2;

FIG. 12 is a diagram showing the correction by the correction part ofthe embodiment 2;

FIGS. 13A to 13C are views showing the areas in the modifications 3, 4and 5 of the embodiment 2;

FIGS. 14A and 14B are views showing two images processed by an imageprocessing apparatus of an embodiment 3;

FIG. 15 is a diagram showing the correction by the correction part ofthe embodiment 3;

FIG. 16 is a diagram showing another correction by the correction partof the embodiment 3; and

FIGS. 17A and 17B are concept diagrams showing one example of a computerreadable recording medium where an image processing program 19 isrecorded.

BEST MODE FOR CARRYING OUT THE INVENTION

The preferred embodiment 1 of an image processing apparatus according tothe present invention will be described below with reference to thedrawings.

<Configuration>

FIG. 1 is a diagram showing the configuration of an image processingapparatus according to an embodiment of the invention, FIGS. 2A and 2Bshow two images before processing by the image processing apparatus ofthis embodiment, and FIGS. 3B1, 3B2 and 3B3 show two images afterprocessing by the image processing apparatus of this embodiment. Theimage processing apparatus 10 of this embodiment comprises a first inputpart 11, a second input part 12, an operation part 13, a storage part14, a detection part 15, a correction part 16, a display part 17 and aprinting part 18 to correct a second image 30 a by referring to a firstimage 20 a.

The first input part 11 may be a scanner for example, for scanning theprint contents printed on a print medium such as a print sheet andreading them in digital format to produce the first image data 20 brepresenting the read first image 20 a.

The second input part 12 may be a digital camera, for example, forpicking up an image of the subject such as substance to produce thesecond image data 30 b representing the taken second image 30 a.

Herein, the input by the first input part 11 that is the scanner has arelatively high reliability in the color of the input first image 20 a,because the conditions for its light source and background are fixed,whereas the input by the second input part 12 that is the digital camerahas a relatively low reliability in the color of the input second image30 a, because the conditions for its light source and background are notfixed.

Though in this embodiment, the first input part 11 and the second inputpart 12 are integrated, together with the other parts 13 to 18, into theimage processing apparatus 10, the first input part 11, the second inputpart 12 and the other parts (13 to 18) may be constituted separately.

As shown in FIGS. 2A and 2B, the first image 20 a representing a sampleof cloth is composed of the objects 21 a, 21 b, 21 c and 21 d which arebasic texture, triangular pattern, round pattern and background, and thesecond image 30 a representing a dress fabricated using the cloth isalso composed of the objects 31 a, 31 b, 31 c and 31 d which are basictexture, triangular pattern, round pattern and background correspondingto the objects 21 a, 21 b, 21 c and 21 d of the first image 20 a.

Returning to FIG. 1, the operation part 13 may be a mouse or a keyboard,for example, which is employed to perform an operation required tocorrect the first and second images 20 a and 30 a, for example, tospecify a range for extracting the feature color.

The storage part 14 may be a storage medium such as a hard disk or aflexible disk, for example, which is employed to store the first imagedata 20 b produced by the first input part 11 and the second image data30 b produced by the second input part 12. The storage part 14 alsostores a program 19 for causing the image processing apparatus 10 toperform the image processing for the first and second images 20 a and 30a.

The detection part 15 may be a CPU (Central Processing Unit), forexample, which extracts a first plurality of feature colors 22 a, 22 band 22 c (as will be described later with reference to FIGS. 5A and 5B)from the first image 20 a and extracts a second plurality of featurecolors 32 a, 32 b and 32 c (as will be described later with reference toFIGS. 5A and 5B) from the second image 30 a to associate both thefeature colors.

The correction part 16, may be a CPU, like the detection part 15, whichcorrects the colors of the second image 30 a having relatively lowreliability to conform with the colors of the first image 20 a havingrelatively high reliability in accordance with the correspondencesbetween the first plurality of feature colors 22 a, 22 b, 22 c and thesecond plurality of feature colors 32 a, 32 b, 32 c, which are made bythe detection part 15.

The display part 17 may be a liquid crystal display or a CRT (CathodeRay Tube) display, which displays the first image 20 a and the secondimage 30 a before correction, and the second images 30 a 1, 30 a 2 and30 a 3 after correction, as shown in FIGS. 2A and 2B, and 3B1 to 3B3.

The printing part 18 may be an ink jet printer, for example, whichprints the first image 20 a and the second image 30 a before correction,and the second images 30 a 1, 30 a 2 and 30 a 3 after correction, likethe display part 17, as shown in FIGS. 2A and 2B, and 3B1 to 3B3.

<Operation>

FIG. 4 is a flowchart showing the operation of the image processingapparatus of this embodiment. The operation of the image processingapparatus of this embodiment will be described below along with theflowchart of FIG. 4. Herein, the program 19 in this embodiment comprisesa detection step corresponding to steps S4 and S5 of FIG. 4 and acorrection step corresponding to step S6 of FIG. 4.

Step S1: The first input part 11 reads the image 20 a as shown in FIG.2A by scanning it to produce the first image data 20 b representing thecontents of the image 20 a. Subsequently, the second input part 12 picksup an image of the subject to produce the second image data 30 brepresenting the second image 30 a acquired as a result, as shown inFIG. 2B.

Step S2: The first and second input parts 11 and 12 output the first andsecond image data 20 b and 30 b to the storage part 14, which stores thefirst and second image data 20 b and 30 b.

Step S3: The detection part 15 reads the first and second image data 20b and 30 b stored in the storage part 14 from the storage part 14, anddisplays them on the display part 17.

Step S4: The detection part 15 extracts the feature colors 22 a, 22 band 22 c from the first image 20 a and extracts the feature colors 32 a,32 b and 32 c from the second image 30 a.

FIGS. 5A and 5B are diagrams for explaining the extraction of featurecolors. In a color histogram as shown in FIGS. 5A and 5B, thetransversal axis represents the hue and the longitudinal axis representsthe frequency of appearance. FIG. 5A shows the frequency of appearancealong the longitudinal axis, which is equivalent to a total number ofelements or a sum of areas making up the first image 20 a as shown inFIG. 2A, for each hue as represented along the transversal axis.Similarly, FIG. 5B shows the frequency of appearance along thelongitudinal axis, which is equivalent to a total number of elements ora sum of areas making up the second image 30 a as shown in FIG. 2B, foreach hue as represented along the transversal axis. Herein, the numberof elements or the area means the number of pixels in the bit map data,or the area of closed domain in the vector data, for example.

The detection part 15 selects the representative colors 23 a, 23 b and23 c at the highest appearance frequency (peak) of hue, or morecorrectly, the maximal value of hue, as the feature colors 22 a, 22 band 22 c of the first image 20 a, from the color histogram of FIG. 5A.Instead of the above selection, the detection part 15 may selectdirectly the representative color groups 24 a, 24 b and 24 c with higherappearance frequency of hue than a threshold Th, or its average, medianand mode, to avoid adverse influence due to hue with low appearancefrequency and improve the precision of correction.

The detection part 15 selects the feature colors 32 a, 32 b and 32 c forthe second image 30 a in the same way as selecting the representativecolors 23 a, 23 b and 23 c or the representative color groups 24 a, 24 band 24 c for the first image 20 a. In the latter selection, thedetection part 15 may employ any other threshold than the threshold Th.

The transversal axis in FIGS. 5A and 5B may employ a color specificationsystem (one- or two-dimensional or more) such as RGB, CMY,hue-saturation-lightness, or L*a*b of the CIE (International LightingCommission), whereby it is possible to make adequate correction betweentwo images in which the illuminating environment (lightness) is greatlydifferent at the photographing time without giving consideration tolightness.

Instead of the above extraction using the color histogram, the detectionpart 15 may extract the feature colors representing the range or domainwhich is specified by the user on the operation part 13, for example.

Step S5: The detection part 15 associates the feature colors 22 a, 22 band 22 c of the first image 20 a and the feature colors 32 a, 32 b and32 c of the second image 30 a. The detection part 15 associates thefeature colors 22 a, 22 b and 22 c and the feature colors 32 a, 32 b and32 c so that the total of differences between one feature color 22 x (xis a, b or c) of the feature colors 22 a, 22 b and 22 c and one featurecolor 32 y (y is a, b or c) of the feature colors 32 a, 32 b and 32 c,or in other words, the total of color differences between the featurecolors 22 x and 32 y corresponding to each other for possiblecombinations of the first feature colors 22 a, 22 b and 22 c and thesecond feature colors 32 a, 32 b and 32 c may be minimized, for example.

In calculating the total of color differences (total difference), it ispossible for the detection part 15 to weight each color differencesbetween the feature colors 22 x and 32 y, and also the appearancefrequency of each feature colors 22 x and 32 y, and calculate theweighted sum of the weighted color differences and the weightedappearance frequencies.

As a result of the correspondence, the representative color 23 a that isthe feature color 22 a of the first image 20 a and the correspondentcolor 35 a that is the feature color 32 a of the second image 30 a areassociated, the representative color 23 b that is the feature color 22 bof the first image 20 a and the correspondent color 35 b that is thefeature color 32 b of the second image 30 a are associated, and therepresentative color 23 c that is the feature color 22 c of the firstimage 20 a and the correspondent color 35 c that is the feature color 32c of the second image 30 a are associated, as shown in FIGS. 5A and 5B.

The detection part 15, instead of the correspondence based on the totalof color differences, may make correspondence employing theconventionally well-known pattern matching methods (e.g., DP matching,graph matching or DLA (Dynamic Link Architecture) of associating thegraphs (nodes) by optimizing the evaluation function by dynamicstatistical method). Since the optimal correspondence can be made overthe entire histogram as shown in FIGS. 5A and 5B by employing thepattern matching methods, the correspondences between the feature colors22 a, 22 b and 22 c and the feature colors 32 a, 32 b and 32 c are madeat high precision.

Step S6: The correction part 16 corrects the color tone of the secondimage 30 a based on the first image 20 a by referring to the abovecorrespondences.

FIG. 6 shows the correction by the correction part in this embodiment.The correction part 16 translates the feature colors 32 a, 32 b and 32 cof the second image 30 a as shown in FIG. 2B into the feature colors 22a, 22 b and 22 c of the first image 20 a as shown in FIG. 2A, andcorrects other colors than the feature colors 32 a, 32 b and 32 c of thesecond image 30 a, based on the correspondences between the featurecolors 22 a, 22 b and 22 c and the feature colors 32 a, 32 b and 32 c,thereby producing the second image 30 a 1 after correction as shown inFIG. 3B 1, as shown in FIG. 6.

Herein, if correction is made without being based on the correspondencedetected by the detection part 15, unlike the above correction,correction is extremely dependent upon the hue of triangular pattern 21b and 31 b, or the hue of round pattern 21 c and 31 c, as shown in FIGS.3B2 and 3B3, producing the second image 30 a 2 and 30 a 3 quitedifferent from the second image 30 a 1 as shown in FIG. 3B 1.

<Effects>

With the image processing apparatus 10 of this embodiment as describedabove, the detection part 15 extracts the feature colors 22 a, 22 b and22 c from the first image 20 a, extracts the feature colors 32 a, 32 band 32 c from the second image 30 a, and further associates the featurecolors 22 a, 22 b and 22 c and the feature colors 32 a, 32 b and 32 c,and the correction part 16 corrects the second image 30 a based on thefirst image 20 a by referring to the correspondences, whereby it ispossible to easily match the color tone of the second image 30 a withthe color tone of the first image 20 a.

Embodiment 2

FIG. 7 shows another correction by the correction part. The correctionpart 16 may make the correction as shown in FIG. 7, instead of thecorrection as shown in FIG. 6, to achieve the same effects as above.Specifically, supposing that the feature colors 22 a and 32 a are onlyassociated, the correction part 16 corrects the hue C(32 a) of thefeature color 32 a into the hue C(22 a) of the feature color 22 a andfurther corrects, based on the correction, the hue C(32 c) of thefeature color 32 c into the hue C(22 c) of the feature color 22 c in thecolor specification system L*a*b*, as shown in FIG. 7.

More particularly, the correction part 16 corrects the hue C(32 c) intothe hue C(22 c) so that the angle Dc between hue C (32 c) and hue C (22c) may be equal to the angle Da between hue C (32 a) and hue C (22 a),and the relationship between the distance r(32 c) between hue C(32 c)and origin O and the distance r(22 c) between hue C(22 c) and origin Omay be equivalent to the relationship between the distance r(32 a)between hue C(32 a) and origin O and the distance r(22 a) between hueC(22 a) and origin O.

FIG. 8 shows another correction by the correction part. Supposing thatonly the feature colors 22 a and 32 a, and the feature colors 22 b and32 b are associated, the correction part 16 corrects the hue C(32 a) inthe domain 32 a into the hue (22 a), hue C(32 b) into the hue C(22 b),and further the hue C(32 c) into the hue C(22 c) by weighting the firstrelationship between hue C(32 a) and hue C(22 a) and the secondrelationship between hue C(32 b) and hue C(22 b) depending on adifference in color value between hue C(32 c) and hue C(32 a) and adifference in color value between hue C(32 c) and hue C(32 b) in thecolor specification system L*a*b*, as shown in FIG. 8.

The same effects are obtained as above by not operating the amount of L*strongly related to shading but operating the amount of c*, h* mostlyrelated to the tint in the L*c*h* color specification system, instead ofoperating the amount of a*, b* in the color specification system L*a*b*as above.

Herein, an image processing apparatus of this embodiment has the sameconfiguration as shown in FIG. 1 for the embodiment 1, and will bedescribed below by referring to FIG. 1 again. In this embodiment, thefirst image 20 a and the second image 30 a of the embodiment 1 in FIG. 1correspond to the first image 20 a and the second image 30 a as shown inFIGS. 9A and 9B. Accordingly, in this embodiment, in FIGS. 9A and 9B,10A and 10B, 12 and 13A to 13C, the same signs as in the embodiment 1may designate different parts from those of the embodiment 1. Also, inthis embodiment, FIG. 11 is a flowchart showing the operation of theimage processing apparatus 10 of FIG. 4 in the embodiment 1.

<Configuration>

FIGS. 9A and 9B show two images before processing by the imageprocessing apparatus of this embodiment, and FIGS. 10A and 10B show twoimages after processing by the image processing apparatus of thisembodiment. The image processing apparatus 10 of this embodimentcomprises a first input part 11, a second input part 12, an operationpart 13, a storage part 14, a processing part 15, a correction part 16,a display part 17 and a printing part 18 to correct the second image 30a by referring to the first image 20 a.

The first input part 11 may be a scanner, for example, for scanning theprint contents printed on a print medium such as a print sheet andreading them in digital format to produce the first image data 20 brepresenting the read first image 20 a.

The second input part 12 may be a digital camera, for example, forpicking up an image of the subject such as substance to produce thesecond image data 30 b representing the taken second image 30 a in thesame way as above.

Though in this embodiment, the first input part 11 and the second inputpart 12 are integrated, together with the other parts 13 to 18, into theimage processing apparatus 10, the first input part 11, the second inputpart 12 and the other parts (13 to 18) may be constituted separately.

As shown in FIGS. 9A and 9B, the first image 20 a is composed of pluralpieces of pixel data P11 to Pmn (m, n is an integer of two or greater)and the second image 30 a is composed of plural pieces of pixel data Q11to Qmn. Each of the pixel data P11 to Pmn and Q11 to Qmn has the colorinformation indicating three elements of color, or the hue, saturationand lightness. Also, the first image 20 a is composed of the objects 21a, 21 b, 21 c and 21 d such as sky, ground and tree, for example, andthe second image 30 a is also composed of the objects 31 a, 31 b, 31 cand 31 d.

Returning to FIG. 1, the operation part 13 acting as the specificationpart may be a mouse or a keyboard, for example, which is employed toperform an operation required to correct the first and second images 20a and 30 a. The operation part 13 may be employed to specify a domain toassociate the domains 22 a to 22 d of the first image 20 a and thedomains 32 a to 32 d of the second image 30 a, as shown in FIGS. 9A and9B.

More particularly, the operation part 13 may be employed, for the firstimage 20 a and the second image 30 a, to specify the position, shape andsize of the domains 22 a, 32 a by any drawing to associate a desireddomain 22 a of the first image 20 a and a desired domain 32 a of thesecond image 30 a, as shown in FIGS. 9A and 9B. Similarly, the operationpart 13 may be employed to specify other desired domains 22 b, 22 c and22 d of the first image 20 a and other desired domains 32 b, 32 c and 32d of the second image 30 a. In the following, the information indicatingthe representative color of each of the domains 22 a to 22 d and 32 a to32 d is referred to as “domain representative color information”.

Returning to FIG. 1, the storage part 14 may be a storage medium such asa hard disk or a flexible disk, which is employed part 11 and the secondimage data 30 b produced by the second input part 12. The storage part14 also stores a program 19 for causing the image processing apparatus10 to perform the image processing for the first and second images 20 aand 30 a.

The processing part 15 may be a CPU (Central Processing Unit), forexample, to control the overall operation of the image processingapparatus 10, and define the domain representative color information ofthe domains 22 a to 22 d and 32 a to 32 d.

The correction part 16 may be a CPU, like the processing part 15, whichcorrects the hue of the second image 30 a in accordance with the huerelationship between one domain 22 a and one domain 32 a specified bythe operation part 13.

The display part 17 may be a liquid crystal display or a CRT (CathodeRay Tube) display, and displays the first image 20 a and the secondimage 30 a before and after correction, as shown in FIGS. 9A and 9B, and10A and 10B.

The printing part 18 may be an ink jet printer, for example, and printsthe first image 20 a and the second image 30 a before and aftercorrection, like the display part 17, as shown in FIGS. 9A and 9B, and10A and 10B.

<Operation>

FIG. 11 is a flowchart showing the operation of the image processingapparatus of the embodiment 2. The operation of the image processingapparatus of the embodiment 2 will be described below along with theflowchart of FIG. 11. Herein, the program 19 in this embodimentcomprises a first specification step and a second specification stepcorresponding to step S10 of FIG. 11 and a correction step correspondingto step S11 of FIG. 11.

Step S7: The first input part 11 reads the image 20 a as shown in FIG.9A by scanning it to produce the first image data 20 b representing thecontents of the image 20 a. Subsequently, the second input part 12 picksup an image of the subject to produce the second image data 30representing the second image 30 a acquired as a result, as shown inFIG. 9B.

Step S8: The first and second input parts 11, 12 output the first andsecond image data 20 b, 30 b to the storage part 14, which stores thefirst and second image data 20 b, 30 b.

Step S9: The processing part 15 reads the first and second image data 20b, 30 b stored in the storage part 14 from the storage part 14, anddisplays them on the display part 17.

Step S10: The user specifies any domain of the first image 20 a, forexample, domain 22 a, using the operation part 13 and any domain of thesecond image 30 a, for example, domain 32 a (these specified domains 22a, 32 a are hereinafter referred to as “specified domain 22 a” and“specified domain 32 a”), using the operation part 13, therebyassociating the specified domain 22 a and the specified domain 32 a.Herein, when the user specifies the domain by operating the operationpart 13, the processing part 15 prompts the user to specify any domainof the first or second image 20 a, 30 a by displaying a message or thelike.

Step S11: The correction part 16 corrects the second image data 30 b inaccordance with the correspondence relation between domain 22 a anddomain 32 a. Herein, the correction part 16 adjusts the hue of theentire second image 30 a, or provides the entire second image 30 a with“spot”, as shown in FIG. 10B, based on the relationship between hue ofthe domain 22 a before correction (hue abstracted by “spot”) and hue ofthe domain 32 a before correction (hue abstracted by “solid color”),i.e., the correspondence relation between “spot” and “solid color”, asshown in FIGS. 9A and 9B.

FIG. 12 shows the correction by the correction part. As shown in FIG.12, the correction part 16 corrects the hue of the second image 30 abefore correction into the second image data 30 b′ after correctionrepresenting the corrected second image 30 a as shown in FIG. 10B. Moreparticularly, the correction part 16 corrects the hue C(32 a), C(32 b),C(32 c) and C(32 d) that are the domain representative color informationof the specified domain 32 a, domain 32 b, domain 32 c and domain 32 din the first image data 30 b into the hue C′ (32 a), C′ (32 b), C′ (32c) and C′ (32 d), based on the relationship between the hue C(32 a) ofthe specified domain 32 a in the second image data 30 b beforecorrection and the hue C′ (32 a) after correction that is the hue C(22a) of the specified domain 22 a in the first image data 20 b, andadditionally corrects other range than the specified domain 32 a anddomains 32 b to 32 d in the same way. Briefly, the correction part 16corrects the hue of the entire second image 30 a, based on the huerelation between the hue C(32 a) of the specified domain 32 a and thehue C(22 a) of the specified domain 22 a.

<Effects>

With the image processing apparatus 10 of the embodiment 2 as describedabove, the correction part 16 corrects the hue C(32 a) that is thedomain representative color information of the specified domain 32 aspecified by the operation part 13 into the hue C(22 a) or hue C′ (32 a)that is the domain representative color information of the specifieddomain 22 a corresponding to the domain, and additionally corrects thehue C(32 b), C(32 c) and C(32 d) that are the domain representativecolor information of other domains 32 b to 32 d into the hue C′ (32 b),C′ (32 c) and C′ (32 d), thereby correcting the hue of the entire secondimage 30 a, whereby it is possible to make the correction withoutinputting the technical parameters as conventionally needed.

In the image processing apparatus of the embodiment 2 as describedabove, the same effects are obtained by directly specifying the coloritself in the first and second images 20 a, 30 a in making thecorrection, instead of specifying the color of the domain 22 a, 32 a orthe color defined by the domain representative color information in thesite or range such as domains 22 a, 32 a in the first and second images20 a, 30 a.

Modification 1 of Embodiment 2

Instead of one set of domains 32 a, 22 a as specified above, two or moresets of domains, for example, domains 32 a and 22 a and domains 32 b and22 b, may be specified, in which the hue C (32 c) that is the domainrepresentative color information of domain 32 c is corrected byweighting the first relationship between domain 32 a and domain 22 a,and the second relationship between domain 32 b and domain 22 bdepending on a difference in the domain representative color informationbetween domain 32 c and domain 32 a for the domain 32 c, or differencein the color value, and a difference in the domain representative colorinformation between domain 32 c and domain 32 b, or difference in thecolor value, thereby achieving the same effects as above. Herein, the“color value” is the numerical value representing the conceptualchromaticity in the coordinate.

Modification 2 of Embodiment 2

The above correction may be made differently by weighting depending onthe number of sets of the specified domains (e.g., domains 32 a and 32b), instead of depending on the difference in color value as in themodification 1, or more particularly, the hue may be corrected by oneconventionally known correction method when specifying one set ofdomains and by another conventionally known correction method whenspecifying two sets of domains, thereby achieving the same effects asabove.

Modifications 3, 4 and 5 of Embodiment 2

FIGS. 13A to 13B show three domains in the modifications 3, 4 and 5. Ina modification 3, the domain 22 a is composed of plural small domains22-1, 22-2, 22-3, . . . , 22-i (i is any integer), that are equivalentto the pixel data P11 to Pmn, as shown in FIG. 13A. The processing part15 accurately decides the domain representative color information ofdomain 22 a, from the viewpoint of average, median and mode, employingthe small domain representative color information that are the colorinformation of plural small domains 22-1 to 22-i.

The processing part 15 defines the domain representative colorinformation of domain 22 a in terms of the small domain representativecolor information of one or more small domains among the plural smalldomains 22-1 to 220 i. More specifically, the processing part 15 definesit in terms of the small domain representative color information of oneor more small domains having the highest percentage of area occupied inthe domain 22 a among the plural small domains 22-1 to 22-i. Moredesirably, the processing part 15 defines it in terms of the smalldomain representative color information of small domains of which thepercentage of area occupied in the domain 22 a is greater than or equalto a predetermined rate (one-third or half, etc.). The processing part15 defines other domains 22 b to 22 d and 32 a to 32 d in the same way.

In a modification 4, the processing part 15 may define the domainrepresentative color information of the domain 22 a in terms of theneighboring domain representative color information that is the colorinformation representing both the domain 22 a and the neighboring domain22 a′ in the neighborhood of the domain 22 a that is defined by thecontour line (broken line) apart a certain distance from the contourline (solid line) of the domain 22 a, as shown in FIG. 13B.

In a modification 5, the processing part 15 may define the domainrepresentative color information of the domain 22 a in terms of theequivalent domain representative color information that is the colorinformation representing both the domain 22 a and the equivalent domain22 a″, which is considered as substantially equivalent to the domain 22a from the viewpoint of the color, for example, hue, saturation andlightness, as shown in FIG. 13C.

<Configuration>

An image processing apparatus of this embodiment will be describedbelow. The image processing apparatus of this embodiment has the sameconfiguration as shown in FIG. 1 for the embodiment 2, but has adifferent way of correction from the embodiment 2.

FIGS. 14A and 14B show two images processed by the image processingapparatus in the embodiment 2. The image processing apparatus of thisembodiment processes a first image 40 a and a second image 50 a as shownin FIG. 14A, instead of the first image 20 a and the second image 30 aas shown in FIGS. 9A and 9B. The first image 40 a is inputted from thefirst input part 11 that is a scanner, and the second image 50 a isinputted from the second input part 12 that is a digital camera. Theinput by the scanner has high reliability and stability in the color ofthe input first image 40 a because the conditions for its light sourceand background are fixed, whereas the input by the digital camera haslow reliability and stability in the color of the input second image 50a because the conditions for its light source and background are notfixed. The image processing apparatus of the embodiment 2 performs thesame processings as at steps S7 to S10 of FIG. 11, and at step S11,corrects the second image 50 a with reference to the first image 40 a,like the embodiment 2, but in a different way from the correction of theembodiment 2.

<Operation>

FIG. 15 shows the correction by the correction part. For the first image40 a and the second image 50 a in the embodiment 2 as shown in FIGS. 14Aand 14B, like the first image 20 a and the second image 30 a in theembodiment 2, the domains 42 a, 42 b and 52 a to 52 c can be specifiedby the operation part 13. The processing part 15 associates the domain42 a and the domain 52 a, and the domain 42 b and the domain 52 b.

The correction part 16 corrects the hue C(52 a) that is the domainrepresentative color information of the domain 52 a into the hue C′ (52a) that is the hue C(42 a) of the domain 42 a, and additionally correctsthe hue C(52 a) of the domain 52 c into the hue C′ (52 a) in accordancewith the relationship between hue C(52 a) and hue C′ (52 a) in theconventionally well-known color specification system L*a*b+of the CIE(International Lighting Commission), as shown in FIG. 15. Moreparticularly, the correction part 16 corrects the hue C(52 c) into thehue C′ (52 c) so that the angle Dc between hue C(52 c) and hue C′ (52 c)may be equal to the angle Da between hue C (52 a) and hue C′ (52 a), andthe relationship between the distance r (52 c) between hue C (52 c) andorigin O and the distance r′ (52 c) between hue C′ (52 c) and origin Omay be equivalent to the relationship between the distance r(52 a)between hue C(52 a) and origin O and the distance r′ (52 a) between hueC′ (52 a) and origin O.

FIG. 16 shows another correction by the correction part. The correctionpart 16 corrects the hue C(52 a) of the domain 52 a into the hue C′ (52a) that is the hue C(42 a) of the domain 42 a, corrects the hue C(52 b)of the domain 52 b into the hue C′ (52 b) that is the hue C(42 b) of thedomain 42 b, and corrects the hue C(52 c) into the hue C″ (52 c) inaccordance with the first relationship between hue C(52 a) and hue C′(52 a) and the second relationship between hue C(52 b) and hue C′ (52 b)in the color specification system L*a*b*, as shown in FIG. 16. Morespecifically, the correction part 16 corrects the hue C(52 c) into thehue C″ (52 c) by weighting the first relationship and the secondrelationship depending on a difference in the color value between hue C(52 c) and hue C(52 a) and a difference in the color value between hueC(52 c) and hue C (52 b) and reflecting them to the correction.

<Effects>

With the image processing apparatus of the embodiment 2 as describedabove, the second image 50 a inputted from the second input part 12 thatis the digital camera is corrected on the basis of the first image 40 ainputted from the first input part 11 that is the scanner in the colorspecification system L*a*b*, whereby the second image 50 a can becorrected without inputting the composite parameters for imageprocessing more easily than conventionally.

It may be possible to define the chromaticity in the coordinate in a YUVcolor specification system, or in a color space of the system in whichthe color is represented in terms of the information of brightnesssignal (Y), difference (U) between brightness signal and red component,and difference (V) between brightness signal and blue component, insteadof defining the hue in the color value of coordinate in the color spacesuch as the color specification system L*a*b*.

FIGS. 17A and 17B show the CD-ROM (or DVD-ROM) that is one of storagemedia R1 and R2 readable by the computer. An image processing program 19of the embodiment 1 to implement the present invention is stored in thisstorage medium R1, and an image processing program 19 of the embodiment2 to implement the present invention is stored in this storage mediumR2. The image processing program 19 can be easily provided via thecomputer readable storage medium R1 or R2 such as CD-ROM or DVD-ROM tothe user desiring the image processing program 19.

1. An image processing method comprising: a detection step of detecting a correspondence between one color of a first plurality of colors in a first image and one color of a second plurality of colors in a second image; and a correction step of correcting said first plurality of colors or said second plurality of colors in accordance with said correspondence.
 2. The image processing method according to claim 1, wherein said detection step comprises detecting a plurality of correspondences between a first plurality of feature colors and a second plurality of feature colors by extracting said first plurality of feature colors featuring said first image from said first image and extracting said second plurality of feature colors featuring said second image from said second image.
 3. The image processing method according to claim 2, wherein said detection step comprises making a first decision of deciding said first plurality of feature colors in accordance with the extent of appearance of said first plurality of colors, and making a second decision of deciding said second plurality of feature colors in accordance with the extent of appearance of said second plurality of colors.
 4. The image processing method according to claim 3, wherein said detection step comprises making said first decision in accordance with the extent of appearance of a third plurality of colors over a predetermined extent of appearance among said first plurality of colors, and making said second decision in accordance with the extent of appearance of a fourth plurality of colors over a predetermined extent of appearance among said second plurality of colors.
 5. The image processing method according to claim 3, wherein said detection step comprises detecting said plurality of correspondences so that a sum of color differences between feature colors corresponding to each other may be minimized for possible combinations of said first plurality of feature colors and said second plurality of feature colors.
 6. The image processing method according to claim 5, wherein said detection step comprises weighting said color differences and said extents of appearance, and calculating a weighted sum of color differences and a weighted sum of extents of appearance.
 7. The image processing method according to claim 2, wherein said detection step comprises detecting said plurality of correspondences by pattern matching of the color histogram.
 8. The image processing method according to claim 1, wherein said correction step comprises correcting the other colors with reference to one of said first plurality of colors and said second plurality of colors.
 9. The image processing method according to claim 1, wherein said correction step comprises correcting at least one of hue, saturation and lightness based on a color specification system of hue, saturation and lightness.
 10. The image processing method according to claim 2, wherein said detection step comprises extracting said feature colors based on a predetermined domain, or a domain specified by the user.
 11. An image processing apparatus comprising: a detection part of detecting a correspondence between one color of a first plurality of colors in a first image and one color of a second plurality of colors in a second image; and a correction part of correcting said first plurality of colors or said second plurality of colors in accordance with said correspondence.
 12. The image processing apparatus according to claim 11, further comprising a first input part for inputting said first image, and a second input part for inputting said second image.
 13. The image processing apparatus according to claim 12, wherein said first input part is one of a scanner and a digital camera, and said second input part is the other of said scanner and said digital camera.
 14. The image processing apparatus according to claim 11, wherein said correction part corrects the other colors with reference to one of said first plurality of colors and said second plurality of colors.
 15. The image processing apparatus according to claim 11, wherein said correction part corrects at least one of said hue, said saturation and said lightness based on a color specification system of hue, saturation and lightness.
 16. The image processing apparatus according to claim 11, wherein said detection part extracts said feature colors based on a predetermined range or a range specified by the user.
 17. An image processing program for enabling a computer to perform an image processing, said computer having a detection part and a correction part which cooperate to perform the image processing, said program comprising: a detection step of causing said detection part to detect a correspondence between one color of a first plurality of colors in a first image and one color of a second plurality of colors in a second image; and a correction step of causing said correction part to correct said first plurality of colors or said second plurality of colors in accordance with said correspondence.
 18. A computer readable storage medium storing an image processing program for enabling a computer to perform an image processing, said computer having a detection part and a correction part which cooperate to perform the image processing, said program comprising: a detection step of causing said detection part to detect a correspondence between one color of a first plurality of colors in a first image and one color of a second plurality of colors in a second image; and a correction step of causing said correction part to correct said first plurality of colors or said second plurality of colors in accordance with said correspondence.
 19. An image processing method comprising: a specification step of specifying the color in each of two images; and a correction step of correcting the other color in one image in accordance with the relationship between said both colors.
 20. An image processing method comprising: a first specification step of specifying one first domain in a first image capable of specifying a plurality of first domains each having the domain representative color information indicating the representative color of domain; a second specification step of specifying one second domain in a second image capable of specifying a plurality of second domains each having the domain representative color information, said second image corresponding to said first image; a correspondence step of associating said specified one first domain and said specified one second domain; and a correction step of correcting the image color information indicating the color of said second image in accordance with the relationship between the domain representative color information of said one first domain and the domain representative color information of said one second domain which are associated.
 21. The image processing method according to claim 20, wherein said second specification step comprises specifying two or more second domains, and said correction step comprises correcting said image color information in accordance with the relationship between the position of each of said second plurality of domains and the position of each of said two or more second domains.
 22. The image processing method according to claim 20, wherein said first specification step comprises specifying two or more first domains, said second specification step comprises specifying two or more second domains, and said correction step comprises correcting said image color information by different correction methods each depending on the number of correspondences between said two or more first domains and said two or more second domains.
 23. The image processing method according to claim 20, further comprising a definition step of defining said domain representative color information of said domain in terms of the small domain representative color information indicating the representative colors of small domains contained in said domain.
 24. The image processing method according to claim 23, wherein said definition step comprises defining the domain representative color information of said domain in terms of a plurality of small domain representative color information indicating the representative colors of a plurality of small domains contained in said domain.
 25. The image processing method according to claim 23, wherein said definition step comprises defining the domain representative color information of said domain in terms of the small domain representative color information indicating the color having the highest percentage of area occupied in said domain among said plurality of small domain representative color information.
 26. The image processing method according to claim 23, wherein said definition step comprises defining the domain representative color information of said domain in terms of the small domain representative color information indicating the color in which the percentage of area occupied in said domain is greater than or equal to a predetermined rate among said plural pieces of small domain representative color information.
 27. The image processing method according to claim 20, wherein at least one of said first specification step and said second specification step comprises specifying a neighboring domain near said one domain specified by said one specification step, and said definition step comprises defining the domain representative color information of said one domain in terms of the neighboring domain representative color information indicating the representative color of both said one domain and said neighboring domain.
 28. The image processing method according to claim 20, wherein at least one of said first specification step and said second specification step comprises specifying an equivalent domain represented by the color substantially equivalent to the representative color of said one domain specified by said one specification step, and said definition step comprises defining the domain representative color information of said one domain in terms of the equivalent domain representative color information indicating the representative color of both said one domain and said equivalent domain.
 29. The image processing method according to claim 20, wherein at least one of said first specification step and said second specification step comprises specifying said one domain by any drawing.
 30. An image processing apparatus for performing an image processing for a first image capable of specifying a plurality of first domains each having the domain representative color information indicating the representative color of the domain and a second image capable of specifying a plurality of second domains each having the domain representative color information, comprising: a first specification part for specifying one first domain; a second specification part for specifying one second domain; and a correction part for correcting the image color information indicating the color of said second image in accordance with the relationship between the domain representative color information of said one first domain and the domain representative color information of said one second domain.
 31. An image processing program for enabling a computer to perform an image processing, said computer having a specification part and a correction part which cooperate to perform the image processing, in a second image corresponding to a first image capable of specifying a plurality of first domains each having the domain representative color information indicating the representative color of the domain, said second image capable of specifying a plurality of second domains each having the domain representative color information, said program comprising: a specification step of specifying one second domain; and a correction step of correcting the image color information indicating the color of said second image in accordance with the relationship between the domain representative color information of said one second domain and the domain representative color information of one first domain corresponding to said one second domain.
 32. An image processing program for enabling a computer to perform an image processing, said computer having a first input part, a second input part of which the color characteristic is different from that of said first input part, a decision part, a first specification part, a second specification part and a correction part which cooperate to perform the image processing between a first image capable of specifying a plurality of first domains each having the domain representative color information indicating the representative color of the domain and a second image capable of specifying a plurality of second domains each having the domain representative color information, said program comprising: a first specification step of causing said first specification part to specify one first domain; a second specification step of causing said second specification part to specify one second domain; and a correction step of causing said correction part to correct the image color information indicating the color of said second image in accordance with the relationship between the domain representative color information of said one first domain and the domain representative color information of said one second domain.
 33. A computer readable storage medium storing an image processing program for enabling a computer to perform an image processing, said computer having a specification part and a correction part which cooperate to perform the image processing, in a second image corresponding to a first image capable of specifying a plurality of first domains each having the domain representative color information indicating the representative color of the domain, said second image capable of specifying a plurality of second domains each having the domain representative color information, said program comprising: a specification step of specifying one second domain; and a correction step of correcting the image color information indicating the color of said second image in accordance with the relationship between the domain representative color information of said one second domain and the domain representative color information of one first domain corresponding to said one second domain.
 34. A computer readable storage medium storing an image processing program for enabling a computer to perform an image processing, said computer having a first input part, a second input part of which the color characteristic is different from that of said first input part, a decision part, a first specification part, a second specification part and a correction part which cooperate to perform the image processing between a first image capable of specifying a plurality of first domains each having the domain representative color information indicating the representative color of the domain and a second image capable of specifying a plurality of second domains each having the domain representative color information, said program comprising: a first specification step of causing said first specification part to specify one first domain; a second specification step of causing said second specification part to specify one second domain; and a correction step of causing said correction part to correct the image color information indicating the color of said second image in accordance with the relationship between the domain representative color information of said one first domain and the domain representative color information of said one second domain. 